package com.meilai.project.service.app;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.meilai.project.dto.app.QueryWorkOrderProgressDTO;
import com.meilai.project.dto.app.WorkerQueryWorkOrderDTO;
import com.meilai.project.vo.app.*;

import java.util.List;

/**
 * @author 张驰
 * @date 2021/10/31 0:31
 */
public interface AppWorkerService {
    WorkerIndexVO getWorkerIndexInfo();

    Page<WorkerQueryWorkOrderVO> queryWorkOrderList(WorkerQueryWorkOrderDTO dto);

    WorkerQueryWorkOrderProgressVO queryWorkOrderProgress(QueryWorkOrderProgressDTO dto);

    Page<WorkerQueryWorkOrderVO> getWorkOrderListByApp(WorkerQueryWorkOrderDTO dto);

    /**
     * 根据工单ID获取新安装工单未安装的设备数量信息
     *
     * @param orderId
     * @return
     */
    List<WorkMediaPointNoInstallVO> getOrderNoInstallByApp(Long orderId, Long building_area_id);

    /**
     * 根据工单ID获取设备详细信息
     *
     * @param orderId
     * @param isSubmitted
     * @return
     */
    IPage<WorkMediaPointDetailVO> getOrderDetailByApp(Long orderId, Boolean isSubmitted, String code, Long building_area_id, Integer work_order_type_id, Integer current_page, Integer page_size);

    IPage<JSONObject> getBuildingByOrderIdAndOrderType(Long work_order_id, Integer work_order_type_id, String building_name, Integer page, Integer page_size);

    IPage<JSONObject> getBuildingList(String code, Integer page, Integer page_size);

    IPage<JSONObject> getBuildingDeviceList(Long building_area_id, String code, Integer page, Integer page_size);

    JSONArray getOrderByDevice(Long device_id);
}
